/*******************************************************************************
 * Copyright (c) 2010 Marcelo Cataldo, Sangeeth Nambiar
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * DinvenioPerspectiveFactory.java
 * 
 * Perspective factory to arrange the necessary views in DInvinio in the perspective
 * 
 * Contributors:
 *    Marcelo Cataldo  - initial implementation 
 *    Sangeeth Nambiar - initial implementation
 *******************************************************************************/
package edu.cmu.isr.dinvenio.ui.perspectives;

import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;

import edu.cmu.isr.dinvenio.Activator;

public class DinvenioPerspectiveFactory implements IPerspectiveFactory {

	/* (non-Javadoc)
	 * @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
	 */
	@Override
	public void createInitialLayout(IPageLayout myLayout) {
		
		IFolderLayout projectFolder = myLayout.createFolder("ProjectFolder", IPageLayout.LEFT, 0.2f, myLayout.getEditorArea());
		projectFolder.addView(Activator.PROJECT_VIEW_ID);		
		
		IFolderLayout viewFolder = myLayout.createFolder("ViewFolder", IPageLayout.LEFT, 0.8f, myLayout.getEditorArea());
		viewFolder.addView(Activator.GRAPH_VIEW_ID);
		
		IFolderLayout settingsFolder = myLayout.createFolder("settingsFolder", IPageLayout.TOP, 0.3f, myLayout.getEditorArea());	    
		settingsFolder.addView(Activator.SETTINGS_VIEW_ID);
		settingsFolder.addView(Activator.LAYERS_VIEW_ID);
		settingsFolder.addView(Activator.GRAPHCONTROLS_VIEW_ID);
		settingsFolder.addView(Activator.LAYOUT_VIEW_ID);
		
		IFolderLayout propertiesFolder = myLayout.createFolder("propertiesFolder", IPageLayout.TOP, 0.2f, myLayout.getEditorArea());	    
		propertiesFolder.addView(Activator.PROPERTY_VIEW_ID);

	}

}
